package com.rslai.base.tool.servertest.util;

import org.apache.commons.lang.StringUtils;

public class Util {
    public static Boolean isEmpty(Object value) {
        if (value == null) return Boolean.valueOf(true);
        if (StringUtils.isBlank(value.toString())) return Boolean.valueOf(true);
        return Boolean.valueOf(false);
    }

    public static boolean isJson(Object value) {
        if (!(value instanceof String)) return false;
        String json = value.toString();
        return (json.startsWith("{")) && (json.endsWith("}"));
    }
}
